<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* display:grid|inline-grid 会将整个父容器切分成网格 */
        *{
            margin:0;
            padding:0;
        }
        .parent{
            width: 400px;
            height: 400px;
            background-color: red;
            display:grid;
        }
        .item{
            width: 100px;
            height: 100px;
            border: 1px solid #333;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="item">

        </div>
        <div class="item">
            
        </div>
        <div class="item">
            
        </div>
    </div>
</body>
</html>